package com.telsoft.hms.entity;

import java.io.Serializable;

public class ETT_Widget implements Serializable{
	//Object id trong db

    /**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private String id;
    //Tiêu đề
    private String title;
    //Đường dẫn
    private String value;
    //Vị trí hiển thị
    private String position;

    public ETT_Widget() {
    }

    @Override
    public ETT_Widget clone() {
       ETT_Widget rt = new ETT_Widget();
       rt.setId(this.id);
       rt.setTitle(this.title);
       rt.setValue(this.value);
       rt.setPosition(this.position);
       return rt;
    }

    public ETT_Widget(String id, String title, String value) {
       this.id = id;
       this.title = title;
       this.value = value;
    }

    public ETT_Widget(String id, String title, String value, String position) {
       this.id = id;
       this.title = title;
       this.value = value;
       this.position = position;
    }

    public String getId() {
       return id;
    }

    public void setId(String id) {
       this.id = id;
    }

    public String getTitle() {
       return title;
    }

    public void setTitle(String title) {
       this.title = title;
    }

    public String getValue() {
       return value;
    }

    public void setValue(String value) {
       this.value = value;
    }

    /**
     * @return the column Lấy cột
     */
    public Integer getColumn() {
       return Integer.parseInt(position.split(",")[0]);
    }

    /**
     * @param column the column to set
     */
    public String getPosition() {
        return position;
     }
    
    public void setPosition(String position) {
       //Dòng, cột
       this.position = position;
    }

    /**
     * @return the row Lấy dòng
     */
    public Integer getRow() {
       return Integer.parseInt(position.split(",")[1]);
    }
 }
